# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: csslayer <wengxt AT gmail com>

pkgname=fcitx5-qt
pkgver=5.0.17
pkgrel=2
pkgdesc="Fcitx5 Qt Library"
arch=('loong64' 'x86_64')
url="https://github.com/fcitx/fcitx5-qt"
license=('GPL')
groups=('fcitx5-im')
depends=('fcitx5' 'qt5-base')
makedepends=('extra-cmake-modules' 'ninja' 'qt6-base')
source=("https://download.fcitx-im.org/fcitx5/$pkgname/$pkgname-$pkgver.tar.xz"{,.sig})
sha512sums=('88961119bb5ab5485840715eccf960e7201b5597ac4e343078a403de47dca2df10e8616a46821a15cf5eebf91ecb2a457fa0280d3ac3b20d9d369c1597ad286c'
            'SKIP')
validpgpkeys=('2CC8A0609AD2A479C65B6D5C8E8B898CBF2412F9') # Weng Xuetian <wengxt@gmail.com>

build(){
  cd $pkgname-$pkgver

  cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DENABLE_QT4=0 -DENABLE_QT6=1 .
  ninja
}

package() {
  cd $pkgname-$pkgver
  DESTDIR="$pkgdir" ninja install
}
